<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Repetier-Firmware: src/ArduinoAVR/Repetier/uiconfig.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="icon128.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Repetier-Firmware
   &#160;<span id="projectnumber">1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('uiconfig_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">uiconfig.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="uiconfig_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">    This file is part of Repetier-Firmware.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">    Repetier-Firmware is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">    it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">    the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">    (at your option) any later version.</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">    Repetier-Firmware is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">    GNU General Public License for more details.</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">    You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">    along with Repetier-Firmware.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">/* ===================== IMPORTANT ========================</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">The LCD and Key support is new. I tested everything as good as possible,</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">but some combinations may not work as supposed.</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">The I2C methods rely on a stable I2C connection. Noise may cause wrong signals</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">which can cause the firmware to freeze.</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">The ui adds quite some code, so AVRs with 64kB ram (Sanguino, Gen6) can not handle all features</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment">of the firmware at the same time. You have to disable some features to gain the</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment">ram needed. What should work:</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment">- No sd card - the sd card code is quite large.</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment">- No keys attached - The longest part is the menu handling.</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment">- EEPROM_MODE 0 .</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="comment">Currently supported hardware:</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment">*** Displays ***</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment">- direct connected lcd with 4 data lines</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="comment">- connected via i2c</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="comment">*** Keys ***</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="comment">- rotary encoder</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="comment">- push button</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="comment">- key matrix up to 4x4</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="comment">- rotary encoder via i2c (only slow turns are captured correct)</span></div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="comment">- push button via i2c</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="comment">*** Buzzer ***</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="comment">- directly connected, high = on</span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="comment">- connected via i2c, low = on</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="comment">==============================================================*/</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="preprocessor">#ifndef _ui_config_h</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="preprocessor">#define _ui_config_h</span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a01568045a16bd4c43a379d8d9130076c">   68</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_CHARSET 2</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="preprocessor">#ifndef BEEPER_TYPE</span></div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a6f1408350025d689b9a8c4920ddfcf81">   76</a></span>&#160;<span class="preprocessor">#define BEEPER_TYPE 1</span></div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#acc832c7c2fc6bfc96baf17ded9ffe94c">   77</a></span>&#160;<span class="preprocessor">#define BEEPER_TYPE_INVERTING false</span></div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="preprocessor">#if BEEPER_TYPE==1 &amp;&amp; !defined(BEEPER_PIN)</span></div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#ac9aca6bf41a816ccc471c477b594ff64">   81</a></span>&#160;<span class="preprocessor">#define BEEPER_PIN 37</span></div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="preprocessor">#if BEEPER_TYPE==2</span></div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="preprocessor">#define BEEPER_ADDRESS 0x40 // I2C address of the chip with the beeper pin</span></div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="preprocessor">#define BEEPER_PIN _BV(7)  // Bit value for pin 8</span></div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="preprocessor">#define COMPILE_I2C_DRIVER  // We need the I2C driver as we are using i2c</span></div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a1f1cfb8da393500709a423b74c8c60c9">  101</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_TYPE 5</span></div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="preprocessor">#if UI_DISPLAY_TYPE == DISPLAY_U8G // Special case for graphic displays</span></div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<span class="comment">// You need to define which controller you use and set pins accodringly</span></div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="comment">// For software spi assign these definitions</span></div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="comment">// SCK Pin:  UI_DISPLAY_D4_PIN</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="comment">// Mosi Pin: UI_DISPLAY_ENABLE_PIN</span></div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;<span class="comment">// CD Pin:   UI_DISPLAY_RS_PIN</span></div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="comment">// ST7920 with software SPI</span></div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="preprocessor">#define U8GLIB_ST7920</span></div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="comment">// SSD1306 with software SPI</span></div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="comment">//#define U8GLIB_SSD1306_SW_SPI</span></div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="comment">// SH1106 with software SPI</span></div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;<span class="comment">// U8GLIB_SH1106_SW_SPI</span></div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="comment">// SSD1306 over I2C using hardware I2C pins</span></div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;<span class="comment">// #define U8GLIB_MINI12864_2X_SW_SPI</span></div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="comment">//#define U8GLIB_SSD1306_I2C</span></div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;<span class="comment">// For the 8 bit ks0108 display you need to set these pins</span></div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="comment">// UI_DISPLAY_D0_PIN,UI_DISPLAY_D1_PIN,UI_DISPLAY_D2_PIN,UI_DISPLAY_D3_PIN,UI_DISPLAY_D4_PIN,UI_DISPLAY_D5_PIN,UI_DISPLAY_D6_PIN,UI_DISPLAY_D7_PIN</span></div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="comment">// UI_DISPLAY_ENABLE_PIN,UI_DISPLAY_CS1,UI_DISPLAY_CS2,</span></div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<span class="comment">// UI_DISPLAY_DI,UI_DISPLAY_RW_PIN,UI_DISPLAY_RESET_PIN</span></div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="comment">//#define U8GLIB_KS0108</span></div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="comment">//#define U8GLIB_KS0108_FAST</span></div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="comment">// UI_DISPLAY_RS_PIN = CS</span></div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="comment">// UI_DISPLAY_D5_PIN = A0</span></div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<span class="comment">//#define U8GLIB_ST7565_NHD_C2832_HW_SPI</span></div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="preprocessor">#define UI_LCD_WIDTH 128</span></div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="preprocessor">#define UI_LCD_HEIGHT 64</span></div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="comment">//select font size</span></div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;<span class="preprocessor">#define UI_FONT_6X10 //default font</span></div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="preprocessor">#ifdef UI_FONT_6X10</span></div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="preprocessor">#define UI_FONT_WIDTH 6</span></div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;<span class="preprocessor">#define UI_FONT_HEIGHT 10</span></div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;<span class="preprocessor">#define UI_FONT_SMALL_HEIGHT 7</span></div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="preprocessor">#define UI_FONT_DEFAULT repetier_6x10</span></div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;<span class="preprocessor">#define UI_FONT_SMALL repetier_5x7</span></div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<span class="preprocessor">#define UI_FONT_SMALL_WIDTH 5 //smaller font for status display</span></div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;<span class="comment">//calculate rows and cols available with current font</span></div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="preprocessor">#define UI_COLS (UI_LCD_WIDTH/UI_FONT_WIDTH)</span></div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="preprocessor">#define UI_ROWS (UI_LCD_HEIGHT/UI_FONT_HEIGHT)</span></div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<span class="preprocessor">#undef UI_DISPLAY_CHARSET</span></div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;<span class="preprocessor">#define UI_DISPLAY_CHARSET 3</span></div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a358d532c9bed430d93e65ddabc9ef375">  154</a></span>&#160;<span class="preprocessor">#define UI_COLS 20</span></div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#abc388782791eea22ff9ca1b2a97c1cd7">  158</a></span>&#160;<span class="preprocessor">#define UI_ROWS 4</span></div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;<span class="preprocessor">#endif // UI_DISPLAY_TYPE</span></div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;<span class="comment">/* What type of chip is used for I2C communication</span></div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;<span class="comment">0 : PCF8574 or PCF8574A or compatible chips.</span></div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;<span class="comment">1 : MCP23017</span></div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a66082321aee99d4f00f639bdf05b9dc8">  165</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_I2C_CHIPTYPE 0</span></div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;<span class="comment">// 0x40 till 0x4e for PCF8574, 0x40 for the adafruid RGB shield, 0x40 - 0x4e for MCP23017</span></div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="comment">// Official addresses have a value half as high!</span></div><div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a66017bbab05e934b49579f36888e644e">  168</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_I2C_ADDRESS 0x4e</span></div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;<span class="comment">// For MCP 23017 define which pins should be output</span></div><div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a28dc42dc5664e2f558eb10866cf34bbc">  170</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_I2C_OUTPUT_PINS 65504</span></div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;<span class="comment">// Set the output mask that is or&#39;d over the output data. This is needed to activate</span></div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;<span class="comment">// a backlight switched over the I2C.</span></div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="comment">// The adafruit RGB shields enables a light if the bit is not set. Bits 6-8 are used for backlight.</span></div><div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#ac6b2b977cdf7c713366841a8d0de15a1">  174</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_I2C_OUTPUT_START_MASK 0</span></div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;<span class="comment">// For MCP which inputs are with pullup. 31 = pins 0-4 for adafruid rgb shield buttons</span></div><div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a42ebf9e35d25362e11be8e3e410c2b08">  176</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_I2C_PULLUP 31</span></div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;<span class="comment">/* How fast should the I2C clock go. The PCF8574 work only with the lowest setting 100000.</span></div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;<span class="comment">A MCP23017 can run also with 400000 Hz */</span></div><div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#ae88f28e8969a19c6be1c1ce9f5934b75">  179</a></span>&#160;<span class="preprocessor">#define UI_I2C_CLOCKSPEED 100000L</span></div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;<span class="preprocessor">#if UI_DISPLAY_TYPE == DISPLAY_I2C // I2C Pin configuration</span></div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="preprocessor">#define UI_DISPLAY_RS_PIN _BV(4)</span></div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="preprocessor">#define UI_DISPLAY_RW_PIN _BV(5)</span></div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;<span class="preprocessor">#define UI_DISPLAY_ENABLE_PIN _BV(6)</span></div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;<span class="preprocessor">#define UI_DISPLAY_D0_PIN _BV(0)</span></div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;<span class="preprocessor">#define UI_DISPLAY_D1_PIN _BV(1)</span></div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;<span class="preprocessor">#define UI_DISPLAY_D2_PIN _BV(2)</span></div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;<span class="preprocessor">#define UI_DISPLAY_D3_PIN _BV(3)</span></div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;<span class="preprocessor">#define UI_DISPLAY_D4_PIN _BV(0)</span></div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;<span class="preprocessor">#define UI_DISPLAY_D5_PIN _BV(1)</span></div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<span class="preprocessor">#define UI_DISPLAY_D6_PIN _BV(2)</span></div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;<span class="preprocessor">#define UI_DISPLAY_D7_PIN _BV(3)</span></div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;<span class="comment">// uncomment if your using led to indicated the bed is hot</span></div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;<span class="comment">//#define UI_I2C_HEATBED_LED    _BV(8)</span></div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;<span class="comment">// uncomment if your using led to indicated the extruder is hot</span></div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;<span class="comment">//#define UI_I2C_HOTEND_LED     _BV(7)</span></div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;<span class="comment">// uncomment if your using led to indicated the FAN is on</span></div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;<span class="comment">//#define UI_I2C_FAN_LED        _BV(6)</span></div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;<span class="comment">// Pins for adafruid RGB shield</span></div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;<span class="comment">/*#define UI_DISPLAY_RS_PIN _BV(15)</span></div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;<span class="comment">#define UI_DISPLAY_RW_PIN _BV(14)</span></div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;<span class="comment">#define UI_DISPLAY_ENABLE_PIN _BV(13)</span></div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;<span class="comment">#define UI_DISPLAY_D0_PIN _BV(12)</span></div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;<span class="comment">#define UI_DISPLAY_D1_PIN _BV(11)</span></div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;<span class="comment">#define UI_DISPLAY_D2_PIN _BV(10)</span></div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;<span class="comment">#define UI_DISPLAY_D3_PIN _BV(9)</span></div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;<span class="comment">#define UI_DISPLAY_D4_PIN _BV(12)</span></div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;<span class="comment">#define UI_DISPLAY_D5_PIN _BV(11)</span></div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;<span class="comment">#define UI_DISPLAY_D6_PIN _BV(10)</span></div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;<span class="comment">#define UI_DISPLAY_D7_PIN _BV(9)*/</span></div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;<span class="preprocessor">#else // Direct display connections</span></div><div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#abe452c44eef8523ec9ad22ff02b3114a">  219</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_RS_PIN               63              // PINK.1, 88, D_RS</span></div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;<span class="preprocessor">#define UI_DISPLAY_RW_PIN               -1</span></div><div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#afdd4e20a3a946a0a7a68a21f3325f328">  221</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_ENABLE_PIN           65              // PINK.3, 86, D_E</span></div><div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#aba4b516f14fca27013b8bb8b9b61ba5d">  222</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_D0_PIN               59              // PINF.5, 92, D_D4</span></div><div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a280b85321eb67c6752941354ded541a8">  223</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_D1_PIN               64              // PINK.2, 87, D_D5</span></div><div class="line"><a name="l00224"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a64d1ee8afc5a8213f4cbb7304deb8d7d">  224</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_D2_PIN               44              // PINL.5, 40, D_D6</span></div><div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a52a2fcf183efa66effede46fce32262d">  225</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_D3_PIN               66              // PINK.4, 85, D_D7</span></div><div class="line"><a name="l00226"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a6f9744ec7bf8dda47a76571da6ac54f6">  226</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_D4_PIN               59              // PINF.5, 92, D_D4</span></div><div class="line"><a name="l00227"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a95bc1bb51a278366322969a7275d747a">  227</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_D5_PIN               64              // PINK.2, 87, D_D5</span></div><div class="line"><a name="l00228"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a3dc9c2bb136aa3594051c13fcfdc2040">  228</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_D6_PIN               44              // PINL.5, 40, D_D6</span></div><div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a10e8713a4ba78388b5cafb819ab165d4">  229</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_D7_PIN               66              // PINK.4, 85, D_D7</span></div><div class="line"><a name="l00230"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a0aac5694198f8d58c7ffde791a7034c2">  230</a></span>&#160;<span class="preprocessor">#define UI_DELAYPERCHAR            50</span></div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;<span class="comment">// Special pins for some u8g driven display</span></div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;</div><div class="line"><a name="l00234"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#adb9d61e39f5dc3b6e90b6be95c14cbde">  234</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_CS1 59</span></div><div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a7737e85079c272f98f8239f68c40734c">  235</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_CS2 59</span></div><div class="line"><a name="l00236"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#acc284cc9b9d1b31fe5a90b66809dad39">  236</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_DI 59</span></div><div class="line"><a name="l00237"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a1117450b96efb7813ba6a7eae538cba9">  237</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_RW_PIN 59</span></div><div class="line"><a name="l00238"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#aaa76b491e143a9373616f410e6e2f5dd">  238</a></span>&#160;<span class="preprocessor">#define UI_DISPLAY_RESET_PIN 59</span></div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;<span class="preprocessor">#undef UI_HAS_KEYS</span></div><div class="line"><a name="l00248"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a267f14484086fc10fbc14aecf9bf26a9">  248</a></span>&#160;<span class="preprocessor">#define UI_HAS_KEYS 1</span></div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;</div><div class="line"><a name="l00256"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#aca4374429bb3fe511b688ad4450bfbf8">  256</a></span>&#160;<span class="preprocessor">#define UI_HAS_BACK_KEY 1</span></div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;<span class="comment">/* Then you have the next/previous keys more like up/down keys, it may be more intuitive to change the direction you skip through the menus.</span></div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;<span class="comment">If you set it to true, next will go to previous menu instead of the next menu.</span></div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00262"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a4635b4a804fd89b733657535482862c9">  262</a></span>&#160;<span class="preprocessor">#define UI_INVERT_MENU_DIRECTION 0</span></div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;<span class="comment">//#define UI_HAS_I2C_KEYS</span></div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;<span class="comment">// Do you have a I2C connected encoder?</span></div><div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a3d48a110748918da40a37fdde067bfaf">  268</a></span>&#160;<span class="preprocessor">#define UI_HAS_I2C_ENCODER 0</span></div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;<span class="comment">// Under which address can the key status requested. This is the address of your PCF8574 where the keys are connected.</span></div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;<span class="comment">// If you use a MCP23017 the address from display is used also for keys.</span></div><div class="line"><a name="l00272"></a><span class="lineno"><a class="line" href="uiconfig_8h.html#a8c375dae61ff82c1dc5ce6ff86068041">  272</a></span>&#160;<span class="preprocessor">#define UI_I2C_KEY_ADDRESS 0x40</span></div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;<span class="preprocessor">#ifdef UI_MAIN</span></div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;<span class="comment">/* #######################################################################</span></div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;<span class="comment">                      Key definitions</span></div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;<span class="comment">The firmware is very flexible regarding your input methods. You can use one</span></div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;<span class="comment">or more of the predefined key macros, to define a mapper. If no matching mapper</span></div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;<span class="comment">is available, you can add you c-code for mapping directly into the keyboard</span></div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;<span class="comment">routines. The predefined macros do the same, just hiding the code behind it.</span></div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;<span class="comment">For each key, two seperate parts must be defined. The first is the initialization</span></div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;<span class="comment">which must be added inside uiInitKeys() and the second ist a testing routine.</span></div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;<span class="comment">These come into uiCheckKeys() or uiCheckSlowKeys() depending on the time needed</span></div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;<span class="comment">for testing. If you are in doubt, put it in uiCheckSlowKeys().</span></div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;<span class="comment">uiInitKeys() is called from an interrupt controlling the extruder, so only</span></div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;<span class="comment">fast tests should be put there.</span></div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;<span class="comment">The detect methods need an action identifier. A list of supported ids is found</span></div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;<span class="comment">at the beginning of ui.h It&#39;s best to use the symbol name, in case the value changes.</span></div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;<span class="comment">1. Simple push button connected to gnd if closed on a free arduino pin</span></div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;<span class="comment">    init -&gt; UI_KEYS_INIT_BUTTON_LOW(pinNumber);</span></div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;<span class="comment">    detect -&gt; UI_KEYS_BUTTON_LOW(pinNumber,action);</span></div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;<span class="comment">2. Simple push button connected to 5v if closed on a free arduino pin</span></div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;<span class="comment">    init -&gt; UI_KEYS_INIT_BUTTON_HIGH(pinNumber);</span></div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;<span class="comment">    detect -&gt; UI_KEYS_BUTTON_HIGH(pinNumber,action);</span></div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;<span class="comment">3. Click encoder, A/B connected to gnd if closed.</span></div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;<span class="comment">    init -&gt; UI_KEYS_INIT_CLICKENCODER_LOW(pinA,pinB);</span></div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;<span class="comment">    detect -&gt; UI_KEYS_CLICKENCODER_LOW(pinA,pinB);</span></div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;<span class="comment">         or   UI_KEYS_CLICKENCODER_LOW_REV(pinA,pinB); // reverse direction</span></div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;<span class="comment">    If you can move the menu cursor without a click, just be adding some force in one direction,</span></div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;<span class="comment">    toggle the _REV with non _REV and toggle pins.</span></div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;<span class="comment">    If the direction is wrong, toggle _REV with non _REV version.</span></div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;<span class="comment">    For the push button of the encoder use 1.</span></div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;<span class="comment">4. Click encoder, A/B connected to 5V if closed.</span></div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;<span class="comment">    init -&gt; UI_KEYS_INIT_CLICKENCODER_HIGH(pinA,pinB);</span></div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;<span class="comment">    detect -&gt; UI_KEYS_CLICKENCODER_HIGH(pinA,pinB);</span></div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;<span class="comment">         or   UI_KEYS_CLICKENCODER_HIGH_REV(pinA,pinB); // reverse direction</span></div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;<span class="comment">    If you can move the menu cursor without a click, just be adding some force in one direction,</span></div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;<span class="comment">    toggle the _REV with non _REV and toggle pins.</span></div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;<span class="comment">    If the direction is wrong, toggle _REV with non _REV version.</span></div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;<span class="comment">    For the push button of the encoder use 2.</span></div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;<span class="comment">5. Maxtrix keyboard with 1-4 rows and 1-4 columns.</span></div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;<span class="comment">    init -&gt; UI_KEYS_INIT_MATRIX(r1,r2,r3,r4,c1,c2,c3,c4);</span></div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;<span class="comment">    detect -&gt; UI_KEYS_MATRIX(r1,r2,r3,r4,c1,c2,c3,c4);</span></div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;<span class="comment">    In addition you have to set UI_MATRIX_ACTIONS to match your desired actions.</span></div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;<span class="comment">------- Keys connected via I2C -------------</span></div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;<span class="comment">All keys and the buzzer if present must be on a connected to a single PCF8574 chip!</span></div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;<span class="comment">As all I2C request take time, they belong all in uiCheckSlowKeys.</span></div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;<span class="comment">Dont use the pin ids but instead _BV(pinNumber0_7) as pin id. 0 = First pin</span></div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;<span class="comment">6. Click encoder, A/B connected to gnd if closed.</span></div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;<span class="comment">    init -&gt; not needed, but make sure UI_HAS_I2C_KEY is not commented out.</span></div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;<span class="comment">    detect -&gt; UI_KEYS_I2C_CLICKENCODER_LOW(pinA,pinB);</span></div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;<span class="comment">         or   UI_KEYS_I2C_CLICKENCODER_LOW_REV(pinA,pinB); // reverse direction</span></div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;<span class="comment">    If you can move the menu cursor without a click, just be adding some force in one direction,</span></div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;<span class="comment">    toggle the _REV with non _REV and toggle pins.</span></div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;<span class="comment">    If the direction is wrong, toggle _REV with non _REV version.</span></div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;<span class="comment">    For the push button of the encoder use 7.</span></div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;<span class="comment">    NOTICE: The polling frequency is limited, so only slow turns are captured correct!</span></div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;<span class="comment">7. Simple push button connected to gnd if closed via I2C on a PCF8574</span></div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;<span class="comment">    init -&gt; not needed, but make sure UI_HAS_I2C_KEY is not commented out.</span></div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;<span class="comment">    detect -&gt; UI_KEYS_I2C_BUTTON_LOW(pinNumber,action);</span></div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;<span class="comment">-------- Some notes on actions -------------</span></div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;<span class="comment">There are three kinds of actions.</span></div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;<span class="comment">Type 1: Immediate actions - these are execute and forget actions like home/pre-heat</span></div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;<span class="comment">Type 2: Parameter change action - these change the mode for next/previous keys. They are valid</span></div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;<span class="comment">        until a new change action is initiated or the action is finished with ok button.</span></div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;<span class="comment">Type 3: Show menu action. These actions have a _MENU_ in their name. If they are executed, a new</span></div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;<span class="comment">        menu is pushed on the menu stack and you see the menu. If you assign these actions directly</span></div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;<span class="comment">        to a key, you might not want this pushing behaviour. In this case add UI_ACTION_TOPMENU to the</span></div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;<span class="comment">        action, like UI_ACTION_TOPMENU+UI_ACTION_MENU_XPOSFAST. That will show the menu as top-menu</span></div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;<span class="comment">        closing all othe submenus that were open.</span></div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;<span class="comment">   ####################################################################### */</span></div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;<span class="comment">// Use these codes for key detect. The main menu will show the pressed action in the lcd display.</span></div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;<span class="comment">// after that assign the desired codes.</span></div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;<span class="comment">//#define UI_MATRIX_ACTIONS {2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015}</span></div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;<span class="comment">// Define your matrix actions</span></div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;<span class="preprocessor">#define UI_MATRIX_ACTIONS {UI_ACTION_HOME_ALL, UI_ACTION_TOP_MENU,       UI_ACTION_SET_ORIGIN,      UI_ACTION_NEXT,\</span></div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;<span class="preprocessor">                           UI_ACTION_HOME_Z,   UI_ACTION_MENU_ZPOS,      UI_ACTION_COOLDOWN,        UI_ACTION_OK,\</span></div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;<span class="preprocessor">                           UI_ACTION_HOME_Y,   UI_ACTION_MENU_YPOSFAST,  UI_ACTION_PREHEAT_ALL,     UI_ACTION_PREVIOUS,\</span></div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;<span class="preprocessor">                           UI_ACTION_HOME_X,   UI_ACTION_MENU_XPOSFAST,  UI_ACTION_DISABLE_STEPPER, UI_ACTION_BACK}</span></div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;<span class="preprocessor">#ifdef UI_MATRIX_ACTIONS</span></div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;<span class="keyword">const</span> <span class="keywordtype">int</span> matrixActions[] <a class="code" href="_commands_8cpp.html#a2183542635c0fc418e2164e617fe44f6">PROGMEM</a> = UI_MATRIX_ACTIONS;</div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;<span class="keywordtype">void</span> <a class="code" href="gameduino2_8h.html#afba986e1b6219af0f1677f97c6f0b0b9">uiInitKeys</a>() {</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;<span class="preprocessor">#if UI_HAS_KEYS!=0</span></div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;  <span class="comment">//UI_KEYS_INIT_CLICKENCODER_LOW(33,31); // click encoder on pins 47 and 45. Phase is connected with gnd for signals.</span></div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;  <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(4); <span class="comment">// push button, connects gnd to pin</span></div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;  <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(5);</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;  <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(6);</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;  <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(11);</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;  <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(42);</div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;</div><div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;<span class="comment">//  UI_KEYS_INIT_CLICKENCODER_LOW(47,45); // click encoder on pins 47 and 45. Phase is connected with gnd for signals.</span></div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;<span class="comment">//  UI_KEYS_INIT_BUTTON_LOW(43); // push button, connects gnd to pin</span></div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;<span class="comment">//  UI_KEYS_INIT_MATRIX(32,47,45,43,41,39,37,35);</span></div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;}</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;<span class="keywordtype">void</span> <a class="code" href="gameduino2_8h.html#a079ca469cbcd50cd86c7407a883606b6">uiCheckKeys</a>(uint16_t &amp;action) {</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;<span class="preprocessor">#if UI_HAS_KEYS!=0</span></div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160; <span class="comment">//UI_KEYS_CLICKENCODER_LOW_REV(33,31); // click encoder on pins 47 and 45. Phase is connected with gnd for signals.</span></div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160; <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(4,<a class="code" href="ui_8h.html#a404bc634b7ad57423b8b8412a531c583">UI_ACTION_OK</a>); <span class="comment">// push button, connects gnd to pin</span></div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160; <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(5,<a class="code" href="ui_8h.html#aaa4a7b89072ed573078be6dc3655e6b3">UI_ACTION_NEXT</a>); <span class="comment">// push button, connects gnd to pin</span></div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160; <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(6,<a class="code" href="ui_8h.html#a7d761251c7c0b55f7f7edb2a621f6d12">UI_ACTION_PREVIOUS</a>); <span class="comment">// push button, connects gnd to pin</span></div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160; <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(11,<a class="code" href="ui_8h.html#afaa185811886214a66718bbe7bf90da6">UI_ACTION_BACK</a>); <span class="comment">// push button, connects gnd to pin</span></div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160; <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(42,<a class="code" href="ui_8h.html#ae915626599ace17139e49669b86acb10">UI_ACTION_SD_PRINT</a> ); <span class="comment">// push button, connects gnd to pin</span></div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;<span class="comment">//  UI_KEYS_CLICKENCODER_LOW_REV(47,45); // click encoder on pins 47 and 45. Phase is connected with gnd for signals.</span></div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;<span class="comment">//  UI_KEYS_BUTTON_LOW(43,UI_ACTION_OK); // push button, connects gnd to pin</span></div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;}</div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="gameduino2_8h.html#a8c2c7a81ddb5ce6d6d1be99e4626cb2c">uiCheckSlowEncoder</a>() {</div><div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;<span class="preprocessor">#if defined(UI_HAS_I2C_KEYS) &amp;&amp; UI_HAS_KEYS!=0</span></div><div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;<span class="preprocessor">#if UI_DISPLAY_I2C_CHIPTYPE==0</span></div><div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;  <a class="code" href="class_h_a_l.html#aa062bc3adce6e8c69dd00d494d1eb3d9">HAL::i2cStartWait</a>(<a class="code" href="uiconfig_8h.html#a8c375dae61ff82c1dc5ce6ff86068041">UI_I2C_KEY_ADDRESS</a>+<a class="code" href="_h_a_l_8h.html#ab5c0fbe837494c5f9130a5914854250d">I2C_READ</a>);</div><div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;  uint8_t keymask = <a class="code" href="class_h_a_l.html#ac12a79ed395b63de8b19312f624e8169">HAL::i2cReadNak</a>(); <span class="comment">// Read current key mask</span></div><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;<span class="preprocessor">#if UI_DISPLAY_I2C_CHIPTYPE==1</span></div><div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;    <a class="code" href="class_h_a_l.html#aa062bc3adce6e8c69dd00d494d1eb3d9">HAL::i2cStartWait</a>(<a class="code" href="uiconfig_8h.html#a66017bbab05e934b49579f36888e644e">UI_DISPLAY_I2C_ADDRESS</a>+<a class="code" href="_h_a_l_8h.html#a9536bf85bced4f4e549a82fb18eb6140">I2C_WRITE</a>);</div><div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;    <a class="code" href="class_h_a_l.html#a2ae861b9ffde45780e62d91963721187">HAL::i2cWrite</a>(0x12); <span class="comment">// GIOA</span></div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;    <a class="code" href="class_h_a_l.html#a70293dc24f0a9f7780531b0554fee5de">HAL::i2cStop</a>();</div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;    <a class="code" href="class_h_a_l.html#aa062bc3adce6e8c69dd00d494d1eb3d9">HAL::i2cStartWait</a>(<a class="code" href="uiconfig_8h.html#a66017bbab05e934b49579f36888e644e">UI_DISPLAY_I2C_ADDRESS</a>+<a class="code" href="_h_a_l_8h.html#ab5c0fbe837494c5f9130a5914854250d">I2C_READ</a>);</div><div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;    uint16_t keymask = <a class="code" href="class_h_a_l.html#a125538c0f711c9714bc72b989e8c79b9">HAL::i2cReadAck</a>();</div><div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;    keymask = keymask + (<a class="code" href="class_h_a_l.html#ac12a79ed395b63de8b19312f624e8169">HAL::i2cReadNak</a>()&lt;&lt;8);</div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;  <a class="code" href="class_h_a_l.html#a70293dc24f0a9f7780531b0554fee5de">HAL::i2cStop</a>();</div><div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;  <span class="comment">// Add I2C click encoder tests here, all other i2c tests and a copy of the encoder test belog in uiCheckSlowKeys</span></div><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;  <a class="code" href="ui_8h.html#a767f01eb8f4686b2493c21788aa03c60">UI_KEYS_I2C_CLICKENCODER_LOW_REV</a>(_BV(2),_BV(0)); <span class="comment">// click encoder on pins 0 and 2. Phase is connected with gnd for signals.</span></div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;}</div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;<span class="keywordtype">void</span> <a class="code" href="gameduino2_8h.html#a1d2e4f6a8bd39bd9fbec8317676212d5">uiCheckSlowKeys</a>(uint16_t &amp;action) {</div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;<span class="preprocessor">#if defined(UI_HAS_I2C_KEYS) &amp;&amp; UI_HAS_KEYS!=0</span></div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;<span class="preprocessor">#if UI_DISPLAY_I2C_CHIPTYPE==0</span></div><div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;    <a class="code" href="class_h_a_l.html#aa062bc3adce6e8c69dd00d494d1eb3d9">HAL::i2cStartWait</a>(<a class="code" href="uiconfig_8h.html#a8c375dae61ff82c1dc5ce6ff86068041">UI_I2C_KEY_ADDRESS</a>+<a class="code" href="_h_a_l_8h.html#ab5c0fbe837494c5f9130a5914854250d">I2C_READ</a>);</div><div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;    uint8_t keymask = <a class="code" href="class_h_a_l.html#ac12a79ed395b63de8b19312f624e8169">HAL::i2cReadNak</a>(); <span class="comment">// Read current key mask</span></div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;<span class="preprocessor">#if UI_DISPLAY_I2C_CHIPTYPE==1</span></div><div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;    <a class="code" href="class_h_a_l.html#aa062bc3adce6e8c69dd00d494d1eb3d9">HAL::i2cStartWait</a>(<a class="code" href="uiconfig_8h.html#a66017bbab05e934b49579f36888e644e">UI_DISPLAY_I2C_ADDRESS</a>+<a class="code" href="_h_a_l_8h.html#a9536bf85bced4f4e549a82fb18eb6140">I2C_WRITE</a>);</div><div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;    <a class="code" href="class_h_a_l.html#a2ae861b9ffde45780e62d91963721187">HAL::i2cWrite</a>(0x12); <span class="comment">// GPIOA</span></div><div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;    <a class="code" href="class_h_a_l.html#a70293dc24f0a9f7780531b0554fee5de">HAL::i2cStop</a>();</div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;    <a class="code" href="class_h_a_l.html#aa062bc3adce6e8c69dd00d494d1eb3d9">HAL::i2cStartWait</a>(<a class="code" href="uiconfig_8h.html#a66017bbab05e934b49579f36888e644e">UI_DISPLAY_I2C_ADDRESS</a>+<a class="code" href="_h_a_l_8h.html#ab5c0fbe837494c5f9130a5914854250d">I2C_READ</a>);</div><div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;    uint16_t keymask = <a class="code" href="class_h_a_l.html#a125538c0f711c9714bc72b989e8c79b9">HAL::i2cReadAck</a>();</div><div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;    keymask = keymask + (<a class="code" href="class_h_a_l.html#ac12a79ed395b63de8b19312f624e8169">HAL::i2cReadNak</a>()&lt;&lt;8);</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;    <a class="code" href="class_h_a_l.html#a70293dc24f0a9f7780531b0554fee5de">HAL::i2cStop</a>();</div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;    <span class="comment">// Add I2C key tests here</span></div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;    <a class="code" href="ui_8h.html#a767f01eb8f4686b2493c21788aa03c60">UI_KEYS_I2C_CLICKENCODER_LOW_REV</a>(_BV(2),_BV(0)); <span class="comment">// click encoder on pins 0 and 2. Phase is connected with gnd for signals.</span></div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;    <a class="code" href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">UI_KEYS_I2C_BUTTON_LOW</a>(_BV(1),<a class="code" href="ui_8h.html#a404bc634b7ad57423b8b8412a531c583">UI_ACTION_OK</a>); <span class="comment">// push button, connects gnd to pin</span></div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;    <a class="code" href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">UI_KEYS_I2C_BUTTON_LOW</a>(_BV(3),<a class="code" href="ui_8h.html#afaa185811886214a66718bbe7bf90da6">UI_ACTION_BACK</a>); <span class="comment">// push button, connects gnd to pin</span></div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;    <a class="code" href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">UI_KEYS_I2C_BUTTON_LOW</a>(_BV(4),<a class="code" href="ui_8h.html#ab3d8752161348913470ede0ca42249f4">UI_ACTION_MENU_QUICKSETTINGS</a>+<a class="code" href="ui_8h.html#a0376e7bd1683fa45972d1d56adba98a9">UI_ACTION_TOPMENU</a>); <span class="comment">// push button, connects gnd to pin</span></div><div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;    <a class="code" href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">UI_KEYS_I2C_BUTTON_LOW</a>(_BV(5),<a class="code" href="ui_8h.html#af5f27972b91aec3c713a79624f8c43a9">UI_ACTION_MENU_EXTRUDER</a>+<a class="code" href="ui_8h.html#a0376e7bd1683fa45972d1d56adba98a9">UI_ACTION_TOPMENU</a>); <span class="comment">// push button, connects gnd to pin</span></div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;    <a class="code" href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">UI_KEYS_I2C_BUTTON_LOW</a>(_BV(6),<a class="code" href="ui_8h.html#a8b7577d468ba88db2cdaf41e1a85436c">UI_ACTION_MENU_POSITIONS</a>+<a class="code" href="ui_8h.html#a0376e7bd1683fa45972d1d56adba98a9">UI_ACTION_TOPMENU</a>); <span class="comment">// push button, connects gnd to pin</span></div><div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;<span class="comment">  // Button handling for the Adafruit RGB shild</span></div><div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;<span class="comment">    UI_KEYS_I2C_BUTTON_LOW(4,UI_ACTION_PREVIOUS); // Up button</span></div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;<span class="comment">    UI_KEYS_I2C_BUTTON_LOW(8,UI_ACTION_NEXT); // down button</span></div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;<span class="comment">    UI_KEYS_I2C_BUTTON_LOW(16,UI_ACTION_BACK); // left button</span></div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;<span class="comment">    UI_KEYS_I2C_BUTTON_LOW(2,UI_ACTION_OK); // right button</span></div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;<span class="comment">    UI_KEYS_I2C_BUTTON_LOW(1,UI_ACTION_MENU_QUICKSETTINGS);  //Select button</span></div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;<span class="comment">  // ----- End RGB shield ----------</span></div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;<span class="comment">  */</span></div><div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;</div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;  <span class="comment">//UI_KEYS_MATRIX(32,47,45,43,41,39,37,35);</span></div><div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;}</div><div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;</div><div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;</div><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;</div><div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;</div><div class="ttc" id="class_h_a_l_html_a70293dc24f0a9f7780531b0554fee5de"><div class="ttname"><a href="class_h_a_l.html#a70293dc24f0a9f7780531b0554fee5de">HAL::i2cStop</a></div><div class="ttdeci">static void i2cStop(void)</div><div class="ttdef"><b>Definition:</b> HAL.cpp:459</div></div>
<div class="ttc" id="ui_8h_html_a855e669efc242816863c0b4e7b0e42d6"><div class="ttname"><a href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">UI_KEYS_I2C_BUTTON_LOW</a></div><div class="ttdeci">#define UI_KEYS_I2C_BUTTON_LOW(pin, action_)</div><div class="ttdef"><b>Definition:</b> ui.h:411</div></div>
<div class="ttc" id="class_h_a_l_html_ac12a79ed395b63de8b19312f624e8169"><div class="ttname"><a href="class_h_a_l.html#ac12a79ed395b63de8b19312f624e8169">HAL::i2cReadNak</a></div><div class="ttdeci">static uint8_t i2cReadNak(void)</div><div class="ttdef"><b>Definition:</b> HAL.cpp:506</div></div>
<div class="ttc" id="gameduino2_8h_html_a8c2c7a81ddb5ce6d6d1be99e4626cb2c"><div class="ttname"><a href="gameduino2_8h.html#a8c2c7a81ddb5ce6d6d1be99e4626cb2c">uiCheckSlowEncoder</a></div><div class="ttdeci">void uiCheckSlowEncoder()</div><div class="ttdef"><b>Definition:</b> gameduino2.h:167</div></div>
<div class="ttc" id="ui_8h_html_a60cfc4ad20b7a6814ff8ab3c11faef8f"><div class="ttname"><a href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a></div><div class="ttdeci">#define UI_KEYS_INIT_BUTTON_LOW(pin)</div><div class="ttdef"><b>Definition:</b> ui.h:365</div></div>
<div class="ttc" id="ui_8h_html_a83566d1fbae4377cb445da2415c046ad"><div class="ttname"><a href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a></div><div class="ttdeci">#define UI_KEYS_BUTTON_LOW(pin, action_)</div><div class="ttdef"><b>Definition:</b> ui.h:371</div></div>
<div class="ttc" id="_h_a_l_8h_html_ab5c0fbe837494c5f9130a5914854250d"><div class="ttname"><a href="_h_a_l_8h.html#ab5c0fbe837494c5f9130a5914854250d">I2C_READ</a></div><div class="ttdeci">#define I2C_READ</div><div class="ttdef"><b>Definition:</b> HAL.h:144</div></div>
<div class="ttc" id="ui_8h_html_a8b7577d468ba88db2cdaf41e1a85436c"><div class="ttname"><a href="ui_8h.html#a8b7577d468ba88db2cdaf41e1a85436c">UI_ACTION_MENU_POSITIONS</a></div><div class="ttdeci">#define UI_ACTION_MENU_POSITIONS</div><div class="ttdef"><b>Definition:</b> ui.h:282</div></div>
<div class="ttc" id="class_h_a_l_html_a2ae861b9ffde45780e62d91963721187"><div class="ttname"><a href="class_h_a_l.html#a2ae861b9ffde45780e62d91963721187">HAL::i2cWrite</a></div><div class="ttdeci">static void i2cWrite(uint8_t data)</div><div class="ttdef"><b>Definition:</b> HAL.cpp:475</div></div>
<div class="ttc" id="gameduino2_8h_html_a1d2e4f6a8bd39bd9fbec8317676212d5"><div class="ttname"><a href="gameduino2_8h.html#a1d2e4f6a8bd39bd9fbec8317676212d5">uiCheckSlowKeys</a></div><div class="ttdeci">void uiCheckSlowKeys(int &amp;action)</div><div class="ttdef"><b>Definition:</b> gameduino2.h:168</div></div>
<div class="ttc" id="ui_8h_html_aaa4a7b89072ed573078be6dc3655e6b3"><div class="ttname"><a href="ui_8h.html#aaa4a7b89072ed573078be6dc3655e6b3">UI_ACTION_NEXT</a></div><div class="ttdeci">#define UI_ACTION_NEXT</div><div class="ttdef"><b>Definition:</b> ui.h:61</div></div>
<div class="ttc" id="ui_8h_html_ab3d8752161348913470ede0ca42249f4"><div class="ttname"><a href="ui_8h.html#ab3d8752161348913470ede0ca42249f4">UI_ACTION_MENU_QUICKSETTINGS</a></div><div class="ttdeci">#define UI_ACTION_MENU_QUICKSETTINGS</div><div class="ttdef"><b>Definition:</b> ui.h:280</div></div>
<div class="ttc" id="ui_8h_html_a0376e7bd1683fa45972d1d56adba98a9"><div class="ttname"><a href="ui_8h.html#a0376e7bd1683fa45972d1d56adba98a9">UI_ACTION_TOPMENU</a></div><div class="ttdeci">#define UI_ACTION_TOPMENU</div><div class="ttdef"><b>Definition:</b> ui.h:58</div></div>
<div class="ttc" id="class_h_a_l_html_a125538c0f711c9714bc72b989e8c79b9"><div class="ttname"><a href="class_h_a_l.html#a125538c0f711c9714bc72b989e8c79b9">HAL::i2cReadAck</a></div><div class="ttdeci">static uint8_t i2cReadAck(void)</div><div class="ttdef"><b>Definition:</b> HAL.cpp:494</div></div>
<div class="ttc" id="ui_8h_html_afaa185811886214a66718bbe7bf90da6"><div class="ttname"><a href="ui_8h.html#afaa185811886214a66718bbe7bf90da6">UI_ACTION_BACK</a></div><div class="ttdeci">#define UI_ACTION_BACK</div><div class="ttdef"><b>Definition:</b> ui.h:82</div></div>
<div class="ttc" id="uiconfig_8h_html_a66017bbab05e934b49579f36888e644e"><div class="ttname"><a href="uiconfig_8h.html#a66017bbab05e934b49579f36888e644e">UI_DISPLAY_I2C_ADDRESS</a></div><div class="ttdeci">#define UI_DISPLAY_I2C_ADDRESS</div><div class="ttdef"><b>Definition:</b> uiconfig.h:168</div></div>
<div class="ttc" id="gameduino2_8h_html_a079ca469cbcd50cd86c7407a883606b6"><div class="ttname"><a href="gameduino2_8h.html#a079ca469cbcd50cd86c7407a883606b6">uiCheckKeys</a></div><div class="ttdeci">void uiCheckKeys(int &amp;action)</div><div class="ttdef"><b>Definition:</b> gameduino2.h:166</div></div>
<div class="ttc" id="_h_a_l_8h_html_a9536bf85bced4f4e549a82fb18eb6140"><div class="ttname"><a href="_h_a_l_8h.html#a9536bf85bced4f4e549a82fb18eb6140">I2C_WRITE</a></div><div class="ttdeci">#define I2C_WRITE</div><div class="ttdef"><b>Definition:</b> HAL.h:146</div></div>
<div class="ttc" id="_commands_8cpp_html_a2183542635c0fc418e2164e617fe44f6"><div class="ttname"><a href="_commands_8cpp.html#a2183542635c0fc418e2164e617fe44f6">PROGMEM</a></div><div class="ttdeci">const int8_t sensitive_pins [] PROGMEM</div><div class="ttdef"><b>Definition:</b> Commands.cpp:24</div></div>
<div class="ttc" id="ui_8h_html_a767f01eb8f4686b2493c21788aa03c60"><div class="ttname"><a href="ui_8h.html#a767f01eb8f4686b2493c21788aa03c60">UI_KEYS_I2C_CLICKENCODER_LOW_REV</a></div><div class="ttdeci">#define UI_KEYS_I2C_CLICKENCODER_LOW_REV(pinA, pinB)</div><div class="ttdef"><b>Definition:</b> ui.h:410</div></div>
<div class="ttc" id="ui_8h_html_a404bc634b7ad57423b8b8412a531c583"><div class="ttname"><a href="ui_8h.html#a404bc634b7ad57423b8b8412a531c583">UI_ACTION_OK</a></div><div class="ttdeci">#define UI_ACTION_OK</div><div class="ttdef"><b>Definition:</b> ui.h:83</div></div>
<div class="ttc" id="uiconfig_8h_html_a8c375dae61ff82c1dc5ce6ff86068041"><div class="ttname"><a href="uiconfig_8h.html#a8c375dae61ff82c1dc5ce6ff86068041">UI_I2C_KEY_ADDRESS</a></div><div class="ttdeci">#define UI_I2C_KEY_ADDRESS</div><div class="ttdef"><b>Definition:</b> uiconfig.h:272</div></div>
<div class="ttc" id="gameduino2_8h_html_afba986e1b6219af0f1677f97c6f0b0b9"><div class="ttname"><a href="gameduino2_8h.html#afba986e1b6219af0f1677f97c6f0b0b9">uiInitKeys</a></div><div class="ttdeci">void uiInitKeys()</div><div class="ttdef"><b>Definition:</b> gameduino2.h:165</div></div>
<div class="ttc" id="ui_8h_html_ae915626599ace17139e49669b86acb10"><div class="ttname"><a href="ui_8h.html#ae915626599ace17139e49669b86acb10">UI_ACTION_SD_PRINT</a></div><div class="ttdeci">#define UI_ACTION_SD_PRINT</div><div class="ttdef"><b>Definition:</b> ui.h:94</div></div>
<div class="ttc" id="class_h_a_l_html_aa062bc3adce6e8c69dd00d494d1eb3d9"><div class="ttname"><a href="class_h_a_l.html#aa062bc3adce6e8c69dd00d494d1eb3d9">HAL::i2cStartWait</a></div><div class="ttdeci">static void i2cStartWait(uint8_t address)</div><div class="ttdef"><b>Definition:</b> HAL.cpp:415</div></div>
<div class="ttc" id="ui_8h_html_af5f27972b91aec3c713a79624f8c43a9"><div class="ttname"><a href="ui_8h.html#af5f27972b91aec3c713a79624f8c43a9">UI_ACTION_MENU_EXTRUDER</a></div><div class="ttdeci">#define UI_ACTION_MENU_EXTRUDER</div><div class="ttdef"><b>Definition:</b> ui.h:281</div></div>
<div class="ttc" id="ui_8h_html_a7d761251c7c0b55f7f7edb2a621f6d12"><div class="ttname"><a href="ui_8h.html#a7d761251c7c0b55f7f7edb2a621f6d12">UI_ACTION_PREVIOUS</a></div><div class="ttdeci">#define UI_ACTION_PREVIOUS</div><div class="ttdef"><b>Definition:</b> ui.h:62</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_cdf0096ae548159f0698b0a71289cf6c.html">ArduinoAVR</a></li><li class="navelem"><a class="el" href="dir_360d65efbdba454d299657bac363b72c.html">Repetier</a></li><li class="navelem"><a class="el" href="uiconfig_8h.html">uiconfig.h</a></li>
    <li class="footer">Generated on Tue Sep 19 2017 18:54:00 for Repetier-Firmware by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
